<% layout('/layouts/default.html', {title: '我的地址列表', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa fa-list-alt"></i> ${text('我的资金明细列表')}
			</div>
			<div class="box-tools pull-right">
				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
			</div>
		</div>
		<div class="box-body">
				<#form:form id="searchForm" model="${ztFinancial}" action="${ctx}/ztFinancial/listData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
					<#form:hidden path="ztAdmin.id"/>

			<div class="form-group">
				<label class="control-label">${text('流水号')}：</label>
				<div class="control-inline">
					<#form:input  path="id" maxlength="200" class="form-control width-160"/>
				</div>
			</div>
			<div class="form-group">
				<label class="control-label">${text('类型')}：</label>

				<div class="control-inline width-270">
					<select name='type' style="width:auto;min-width: 90px;padding:6px;border-color:#d2d6de">
						<option value=''>全部</option>
						<option value='1'>未充值</option>
						<option value='2'>已充值</option>
						<option value='3'>支出</option>
						<option value='5'>退款</option>
					</select>
				</div>

			</div>

			<div class="form-group">

				<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>

				<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>

			</div>


		</#form:form>

			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>


// 初始化DataGrid对象
$('#dataGrid').dataGrid({

	columnModel: [
		{header:'${text('流水号')}', name:'id',index:'id',  width:150, align:"center"},
		{header:'${text('用户名称')}', name:'username',index:'username',  width:150, align:"center"},
		{header:'${text('公司名称')}', name:'companyName',index:'companyName',  width:150, align:"center"},
		{header:'${text('显示状态')}', name:'type',index:'type',  width:105, align:"center",formatter: function(val, obj, row, act) {
				if(row.type==1){
					return "未充值";
				}else if(row.type==2){
					return "已充值"
				}else if(row.type==3){
					return "支出"
				}else if(row.type==4){
					return "提现"
				}else if(row.type==5){
					return "已退款"
				}
			}},
		{header:'${text('审核状态')}', name:'audit',index:'audit', width:105, align:"center",formatter: function(val, obj, row, act) {
				if(row.audit==1){
					return "未审核";
				}else{
					return "已审核"
				}
			}},
		{header:'${text('明细')}', name:'content', index:'content', width:220, align:"center"},
		{header:'${text('金额')}', name:'price', width:105, align:"center"},
		{header:'${text('时间')}', name:'createDate', index:'createDate', width:150, align:"center"},
		{header:'${text('手机号')}', name:'phone', index:'phone', width:150, align:"center"},
		{header:'${text('操作人')}', name:'operation', index:'operation', width:75, align:"center"}

	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){

	}
});
</script>